/*
 * @Author: Jiraiya
 * @Date: 2020-03-30 17:17:14
 * @LastEditors: Jiraiya
 * @LastEditTime: 2020-03-31 15:16:27
 * @Description: 
 */
import * as React from 'react';

export default (props) => {
    const {error, pastDelay, isLoading, timedOut, retry} = props;
    if (props.error) {
        return <div>Error! <button onClick={ retry }>Retry</button></div>;
      } else if (timedOut) {
        return <div>Taking a long time... <button onClick={ retry }>Retry</button></div>;
      } else if (props.pastDelay) {
        return <div>Loading...</div>;
      } else {
        return null;
      }
}